package cn.cht.sqlsession;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

public interface SqlSession {
    //查询所有
    public <E> List<E> selectList(String statementid,Object ... params) throws Exception;

    //查询单个
    public <T>  T selectOne(String statementid,Object ... params) throws Exception;

    //为dao接口 生成代理实现类
    public <T> T getMapper(Class<?> mapperClass);

    /**
     * 添加属性
     * @param statementid
     * @param params
     * @return
     */
    void addOne(String statementid,Object ... params) throws Exception;

    /**
     * 修改属性
     * @param statementid
     * @param params
     */
    void update(String statementid,Object ... params) throws Exception;

    /**
     * 删除
     * @param statementid
     * @param params
     */
    void delete(String statementid,Object ... params) throws Exception;
}
